1. Objectives: In the US, opioids are widely used for maintenance treatment of opioid use disorder (OUD) and to manage acute and chronic pain. Over the past three decades, efforts to treat pain aggressively in the absence of objective markers to guide opioid prescribing have led to a quadrupling of opioid prescriptions, an epidemic of opioid misuse and abuse, and a tripling of the overdose death rate in the general population and among Veterans. The overarching objective of this proposal is to identify valid biomarkers of opioid sensitivity, which can be used to guide the safe and effective use of opioid agonists to treat both OUD and pain. Following the identification of pharmacogenetic predictors, we will validate the findings in an independent MVP sample. The findings will inform the treatment of OUD using buprenorphine and the management of acute and chronic pain with prescription opioids. 2. Research Design: We will conduct a series of genome-wide association studies (GWASs) using data from the Million Veteran Program (MVP). The initial GWAS will be conducted in the ~300,000 Veterans for whom GWAS data are currently available; genotypes from ~100,000 newly recruited participants will be used to replicate the initial findings. 3. Methodology: We will conduct separate GWASs of: 1) the effectiveness and dosing of buprenorphine maintenance, using urine drug screen data and VA pharmacy dosing records; 2) mean maximal morphine equivalent dose (MEDD) in treating acute pain in the perioperative period, separately for different classes of opioids, using inpatient pharmacy records for Veterans who have undergone hip or knee arthroplasty; and 3) opioid analgesic dosing for the treatment of chronic pain, using outpatient pharmacy records to estimate mean MEDD for the month of heaviest opioid use. Analyses will also be run both separately by opioid class (followed by meta-analysis) and with longitudinal trajectories of opioid use. Regression analyses will examine the proportion of urine tests positive for opioids and usual daily dosage of buprenorphine for maintenance, mean maximal MEDD in inpatient analyses, and MEDD and opioid use trajectories in outpatient analyses. Imputed minor allele dosage, age, body weight, sex, and the top ancestry principal components will serve as covariates, along with covariates relevant to each of the specific aims. We will conduct all GWAS analyses separately by population group and combine the results by meta-analysis. Polygenic risk score (PRS) analysis will serve to increase the utility of the GWAS findings. 4. Impact/Significance: The identification and validation of genetic variants and PRS scores will be used to generate indices that can be evaluated prospectively as guides to prescribers in their selection of the optimal opioid agonist and dosage for buprenorphine maintenance and opioid analgesia. Personalizing the treatment of OUD can increase its effectiveness and reduce relapse risk and adverse effects of maintenance therapy. Genetic predictors of opioid analgesic dosing could help to reduce both excessive dosing of these widely used medications and their diversion, abuse, and overdose risk, and under dosing, which provides inadequate pain control.